home *** CD-ROM | disk | FTP | other *** search
/ NBC Slam Jams! / NBC Slam Jams!.iso / xtras / media_la / effector.cst / 00010_Script_Rotate Click < prev    next >
Text File  |  1997-09-30  |  2KB  |  59 lines

  1. -- Rotate On Click
  2.  
  3.  
  4.  
  5.  
  6. Property pStep, pDirection,activated,pInterp
  7.  
  8. on getPropertyDescriptionList
  9.   if not alphamaniacCheck(the currentSpriteNum) then exit
  10.   
  11.   set pList=[:]
  12.   addProp pList,#pDirection,[format:#symbol,comment:"Direction:", Default:#CW,range:[#CW,#CCW]]
  13.   addProp pList,#pStep,[format:#integer,comment:"Degrees per step:", Default:5, range:[min:5,max:45]]
  14.   addProp pList,#pInterp,[format:#symbol,¼
  15.                                comment:"Interpolation:",¼
  16.                                Default:#On,range:[#Off,#On,#Paused]]
  17.   
  18.   return pList
  19. end
  20.  
  21. on beginSprite me
  22.   set s=the spriteNum of me
  23.   if not alphaManiac(s) then exit
  24.   
  25.   set pInterp=interpolation(pInterp)
  26.   if pDirection=#CCW then set pStep = pStep * -1
  27.   set activated=false
  28. end
  29.  
  30. on mouseDown me
  31.   set activated=true
  32. end
  33.  
  34. on mouseUp me
  35.   set activated=false
  36. end
  37.  
  38. on mouseWithin me
  39.   if activated then step(me)
  40. end
  41.  
  42. on step me
  43.   set s=the spriteNum of me
  44.   if not alphaManiac(s) then exit
  45.   
  46.   rotate(sprite s,[animMode:#static,deltaDegrees:pStep,interpolation:pInterp])
  47. end
  48.  
  49.  
  50. on getBehaviorDescription me
  51.   set msg= "Your AlphaManiac will rotate by a specified amount each time it's clicked, and will keep rotating if you hold the mouse button down on it."
  52.   put return & return after msg
  53.   put "Parameters:" & return & "-----------" & return  after msg
  54.   put "*        Direction:   CW (Clockwise) or CCW" & return after msg
  55.   put "*  Degrees/Step:  How much does it move each click?" & return after msg
  56.   put "*   Interpolation:   On,Off,or While Paused" after msg
  57.   put return & "-----------" & return & return  & ">>>" && amTip()  after msg
  58.   return msg
  59. end